<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<form action="StudentRegisterController" method="post">
		<table>
			<tr>
				<td>StudentID:</td>
				<td><input type="text" name="sid">
			</tr>
			<tr>
				<td>StudentName:</td>
				<td><input type="text" name="sname">
			</tr>
			<tr>
				<td>Fees:</td>
				<td><input type="text" name="fees">
			</tr>
			<tr>
				<td><input type="submit" name="action" value="Save"></td>
				<td><input type="submit" name="action" value="Retrieve"></td>
			</tr>

		</table>
	</form>

	<c:if test="${!empty smsg }">
		<font color="green" size=""> <c:out value="${smsg} "></c:out>
		</font>

	</c:if>
	<c:if test="${!empty emsg }">
		<font color="red" size=""> <c:out value="${emsg} "></c:out>
		</font>

	</c:if>
	<table>
		<tr>
			<td>SID</td>
			<td>SNAME</td>
			<td>FEES</td>
		</tr>
		<c:forEach items="${students}" var="s">
			<tr>
				<td><c:out value="${s.sid}" /></td>
				<td><c:out value="${s.name}" /></td>
				<td><c:out value="${s.fees}" /></td>
			</tr>
		</c:forEach>


	</table>
</body>
</html>